<template>
  <div class="cart-list">
    <betterscroll class="content" ref="newrefresh">
      <div  v-for="iteminfo in cartlist">
      <childlistitem  :iteminfo="iteminfo" :key="iteminfo.iid"></childlistitem>
      </div>
    </betterscroll>
    <childbutton v-for="iteminfo in cartlist"></childbutton>
  </div>
</template>

<script>
import childlistitem from "views/shopcart/childshopcart/childlistitem";
import betterscroll from "components/common/betterscroll/betterscroll";
import childbutton from "views/shopcart/childshopcart/childbutton";
import { mapGetters } from "vuex";
export default {
  name: "navshopcart",
  data() {
    return {
      
    }
  },
  computed: {
    ...mapGetters([
      "cartlist"
    ])
  },
  components: {
    childlistitem,
    betterscroll,childbutton
  },
  activated() {
    //每次进入购物车的时候都刷新一次
    console.log("lihaoge ");
    this.$refs.newrefresh.refreshimg();
  }
};
</script>

<style>
.cart-list {
  height: calc(100% - 44px -49px - 50px);
}
</style>